package edu.sctu.xiangkun.day201505.day20150510.information;

/**
 * Created by user21 on 2015/5/10.
 */
public class InforThree {
    public static void main(String[] args){


        InforOne inforone1 = new InforOne("王二",19,"男");
        InforOne inforone2 = new InforOne("张三",21,"女");
        InforOne inforone3 = new InforOne("刘一",23,"男");
        InforOne[] use = {inforone1,inforone2,inforone3};
        array(use);



    }
    public static void array( InforOne[] use){
        for(int i =0;i<use.length;i++) {
            if(use[i].age>=20) {
                System.out.println("name:" + use[i].name + "\tage:" + use[i].age + "\tsex:" + use[i].sex);
            }
        }

    }
}
